package logbrowse;

import java.io.File;
import java.io.IOException;

public class Main {
	public static void main(String[] args) {
		LogModel model = null;
		for (int i = 0; i < args.length; i++) {
			try {
				model = LogModel.openFile(new File(args[i]));
			} catch (IOException e) {
				System.err.println("could not open '" + args[i] + "'");
				e.printStackTrace();
			}
		}
		if (model == null) {
			model = LogModel.createEmpty();
		}
		
		BrowseFrame frame = new BrowseFrame(model);
		frame.setVisible(true);
	}
}
